package com.ln.adoms.vo;

import com.ln.adoms.entity.Goods;

public class ScanGoodsVO {

	private Integer gId;// 所属商品

	private Integer mId;// 所属商品
	private String mName;
	private Integer mNumOfBox; // 每箱数量

	private Integer dId;// 所属部门

	private Integer oId; // 所属订单
	private String state; // 状态

	private Integer qgId; // 所属二维码
	private Integer qbId; // 所属箱码
	private String qwCode; // 流水码
	private Integer qbNumOfBox; // 所属箱码规格

	public ScanGoodsVO() {

	}

	public ScanGoodsVO(Goods goods) {
		if (goods != null) {
			this.gId = goods.getId();
			if (goods.getMarchandise() != null) {
				this.mId = goods.getMarchandise().getId();
				this.mName = goods.getMarchandise().getName();
				this.mNumOfBox = goods.getMarchandise().getNumOfBox();
			}
			if (goods.getDepartment() != null) {
				this.dId = goods.getDepartment().getId();
			}
			if (goods.getOrder() != null) {
				this.oId = goods.getOrder().getId();
			}
			this.state = goods.getState();
			if (goods.getQrCode() != null) {
				this.qgId = goods.getQrCode().getId();
				this.qwCode = goods.getQrCode().getwCode();
				this.qbId = goods.getQrCode().getBox().getId();
				this.qbNumOfBox = goods.getQrCode().getBox().getGoodsNum();
			}
		}
	}

	public Integer getmId() {
		return mId;
	}

	public void setmId(Integer mId) {
		this.mId = mId;
	}

	public String getmName() {
		return mName;
	}

	public void setmName(String mName) {
		this.mName = mName;
	}

	public Integer getmNumOfBox() {
		return mNumOfBox;
	}

	public void setmNumOfBox(Integer mNumOfBox) {
		this.mNumOfBox = mNumOfBox;
	}

	public Integer getdId() {
		return dId;
	}

	public void setdId(Integer dId) {
		this.dId = dId;
	}

	public Integer getoId() {
		return oId;
	}

	public void setoId(Integer oId) {
		this.oId = oId;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Integer getQgId() {
		return qgId;
	}

	public void setQgId(Integer qgId) {
		this.qgId = qgId;
	}

	public Integer getQbId() {
		return qbId;
	}

	public void setQbId(Integer qbId) {
		this.qbId = qbId;
	}

	public Integer getQbNumOfBox() {
		return qbNumOfBox;
	}

	public void setQbNumOfBox(Integer qbNumOfBox) {
		this.qbNumOfBox = qbNumOfBox;
	}

	public String getQwCode() {
		return qwCode;
	}

	public void setQwCode(String qwCode) {
		this.qwCode = qwCode;
	}

	public Integer getgId() {
		return gId;
	}

	public void setgId(Integer gId) {
		this.gId = gId;
	}

}
